﻿# CMakeList.txt: kv_skiplist 的 CMake 项目，在此处包括源代码并定义
# 项目特定的逻辑。
#
cmake_minimum_required (VERSION 3.8)

# Enable Hot Reload for MSVC compilers if supported.
if (POLICY CMP0141)
  cmake_policy(SET CMP0141 NEW)
  set(CMAKE_MSVC_DEBUG_INFORMATION_FORMAT "$<IF:$<AND:$<C_COMPILER_ID:MSVC>,$<CXX_COMPILER_ID:MSVC>>,$<$<CONFIG:Debug,RelWithDebInfo>:EditAndContinue>,$<$<CONFIG:Debug,RelWithDebInfo>:ProgramDatabase>>")
endif()

project ("kv_skiplist")

# 将源代码添加到此项目的可执行文件。
add_executable (kv_skiplist "kv_skiplist.cpp" "kv_skiplist.h")

if (CMAKE_VERSION VERSION_GREATER 3.12)
  set_property(TARGET kv_skiplist PROPERTY CXX_STANDARD 20)
endif()

if (CMAKE_CXX_COMPILER_ID MATCHES "GNU" OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")  
  target_compile_options(stress_test PRIVATE -std=c++11)  
endif()  

if (UNIX AND NOT APPLE)  
  find_package(Threads REQUIRED)  
  target_link_libraries(stress_test Threads::Threads)  
endif()  

# TODO: 如有需要，请添加测试并安装目标。
